import { InputType, Field } from '@nestjs/graphql';
import { IsNotEmpty, MinLength, IsString } from 'class-validator';

@InputType()
export class ModifyAccountInput {
    @Field({ description: '用户名' })
    @MinLength(2, { message: '用户名最小长度为2' })
    @IsNotEmpty({ message: '用户名不能为空' })
    username: string

    @Field({ description: '密码' })
    @IsString({message: '必须是字符类型'})
    @IsNotEmpty({ message: '密码不能为空' })
    password: string
}
